For production usage, you really shouldn't be installing them on the same machine.
Not sure what level of detail you are looking for.. but the complete set of steps are documented in the Sametime Infocenter:
http://publib.boulder.ibm.com/infocenter/sametime/v8r0/index.jsp
installing Sametime server:
1. install the product
2. configure it to use either domino or ldap directory for authentication (it would be better to use some ldap , but not required)
3. run the server, and verify that you can login via a sametime client
installing gateway:
1. install db2
2. create db2 db by running db creation script
3. install gateway (which installs Websphere for you)
4. walk through configuration of gateway
5. setup SSL if u want to talk to public ims like aol and yahoo
6. make necessary tweaks to Sametime environment to allow gw to talk to it
again, all step by step procedures are documented in the Sametime infocenter.
this is the best place for you to get up to date information regarding product administration.